package packing;

import java.io.Serializable;

public class Box extends BoxShape implements Serializable{
	
	String id;
	BlockRelation relation;
	String position;
	String beforBox;
	int pressure;
	int weight;
	
	
	public BlockRelation getRelation() {
		return relation;
	}

	public void setRelation(BlockRelation relation) {
		this.relation = relation;
	}

	public String getId() {
		if(relation == null)	return id;
		else 	return id + "-" + relation;
	}

	public void setId(String id) {
		this.id = id;
	}

	public Box(String id, int width, int length, int height,int pressure,int weight,boolean xr,boolean yr,boolean zr,int price) {		
		super(width, length, height,xr,yr,zr,price);
		this.id = id;
		this.pressure = pressure;
		this.weight = weight;
	}
	public Box() {	}

	@Override
	public String toString() {
		return "BoxPack : id=" + id + ", ความกว้าง =" + width + ", ความยาว =" + length
				+ ", ความสูง =" + height + "\n";
	}

	public String getPosition() {
		return position;
	}

	public void setPosition(String position) {
		this.position = position;
	}

	public String getBeforBox() {
		return beforBox;
	}

	public void setBeforBox(String beforBox) {
		this.beforBox = beforBox;
	}

	public int getPressure() {
		return pressure;
	}

	public void setPressure(int pressure) {
		this.pressure = pressure;
	}

	public int getWeight() {
		return weight;
	}

	public void setWeight(int weight) {
		this.weight = weight;
	}
	
	
}


